<?php

/**
 * Listvend form base class.
 *
 * @method Listvend getObject() Returns the current form's model object
 *
 * @package    exproaqua
 * @subpackage form
 * @author     Luis Hernández
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseListvendForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_empresa'     => new sfWidgetFormInputText(),
      'agencia'        => new sfWidgetFormInputText(),
      'codigo'         => new sfWidgetFormInputHidden(),
      'nombre'         => new sfWidgetFormInputText(),
      'direccion'      => new sfWidgetFormInputText(),
      'comision'       => new sfWidgetFormInputText(),
      'sector'         => new sfWidgetFormInputText(),
      'fecha'          => new sfWidgetFormDate(),
      'cedula'         => new sfWidgetFormInputText(),
      'telefonos'      => new sfWidgetFormInputText(),
      'telefono_movil' => new sfWidgetFormInputText(),
      'cobranza'       => new sfWidgetFormInputText(),
      'expediente'     => new sfWidgetFormTextarea(),
      'codigocont'     => new sfWidgetFormInputText(),
      'activcomi'      => new sfWidgetFormInputText(),
      'desde1'         => new sfWidgetFormInputText(),
      'desde2'         => new sfWidgetFormInputText(),
      'desde3'         => new sfWidgetFormInputText(),
      'desde4'         => new sfWidgetFormInputText(),
      'desde5'         => new sfWidgetFormInputText(),
      'desde6'         => new sfWidgetFormInputText(),
      'hasta1'         => new sfWidgetFormInputText(),
      'hasta2'         => new sfWidgetFormInputText(),
      'hasta3'         => new sfWidgetFormInputText(),
      'hasta4'         => new sfWidgetFormInputText(),
      'hasta5'         => new sfWidgetFormInputText(),
      'hasta6'         => new sfWidgetFormInputText(),
      'prccomi1'       => new sfWidgetFormInputText(),
      'prccomi2'       => new sfWidgetFormInputText(),
      'prccomi3'       => new sfWidgetFormInputText(),
      'prccomi4'       => new sfWidgetFormInputText(),
      'prccomi5'       => new sfWidgetFormInputText(),
      'prccomi6'       => new sfWidgetFormInputText(),
      'bono1'          => new sfWidgetFormInputText(),
      'bono2'          => new sfWidgetFormInputText(),
      'bono3'          => new sfWidgetFormInputText(),
      'bono4'          => new sfWidgetFormInputText(),
      'bono5'          => new sfWidgetFormInputText(),
      'bono6'          => new sfWidgetFormInputText(),
      'utilvent'       => new sfWidgetFormInputText(),
      'aplicaramendoc' => new sfWidgetFormInputText(),
      'cobdesde1'      => new sfWidgetFormInputText(),
      'cobdesde2'      => new sfWidgetFormInputText(),
      'cobdesde3'      => new sfWidgetFormInputText(),
      'cobdesde4'      => new sfWidgetFormInputText(),
      'cobdesde5'      => new sfWidgetFormInputText(),
      'cobdesde6'      => new sfWidgetFormInputText(),
      'cobhasta1'      => new sfWidgetFormInputText(),
      'cobhasta2'      => new sfWidgetFormInputText(),
      'cobhasta3'      => new sfWidgetFormInputText(),
      'cobhasta4'      => new sfWidgetFormInputText(),
      'cobhasta5'      => new sfWidgetFormInputText(),
      'cobhasta6'      => new sfWidgetFormInputText(),
      'cobprccomi1'    => new sfWidgetFormInputText(),
      'cobprccomi2'    => new sfWidgetFormInputText(),
      'cobprccomi3'    => new sfWidgetFormInputText(),
      'cobprccomi4'    => new sfWidgetFormInputText(),
      'cobprccomi5'    => new sfWidgetFormInputText(),
      'cobprccomi6'    => new sfWidgetFormInputText(),
      'cobbono1'       => new sfWidgetFormInputText(),
      'cobbono2'       => new sfWidgetFormInputText(),
      'cobbono3'       => new sfWidgetFormInputText(),
      'cobbono4'       => new sfWidgetFormInputText(),
      'cobbono5'       => new sfWidgetFormInputText(),
      'cobbono6'       => new sfWidgetFormInputText(),
      'valoraporcent'  => new sfWidgetFormInputText(),
      'no_comi_art'    => new sfWidgetFormInputText(),
      'art_prc_1'      => new sfWidgetFormInputText(),
      'art_prc_2'      => new sfWidgetFormInputText(),
      'art_prc_3'      => new sfWidgetFormInputText(),
      'art_prc_4'      => new sfWidgetFormInputText(),
      'art_prc_5'      => new sfWidgetFormInputText(),
      'art_prc_6'      => new sfWidgetFormInputText(),
      'art_prc_7'      => new sfWidgetFormInputText(),
      'email'          => new sfWidgetFormInputText(),
      'campo1'         => new sfWidgetFormInputText(),
      'campo2'         => new sfWidgetFormInputText(),
      'campo3'         => new sfWidgetFormInputText(),
      'campo4'         => new sfWidgetFormInputText(),
      'campo5'         => new sfWidgetFormInputText(),
      'claverest'      => new sfWidgetFormInputText(),
      'es_servidor'    => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id_empresa'     => new sfValidatorString(array('max_length' => 6)),
      'agencia'        => new sfValidatorString(array('max_length' => 3)),
      'codigo'         => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'codigo', 'required' => false)),
      'nombre'         => new sfValidatorString(array('max_length' => 54, 'required' => false)),
      'direccion'      => new sfValidatorString(array('max_length' => 74, 'required' => false)),
      'comision'       => new sfValidatorNumber(array('required' => false)),
      'sector'         => new sfValidatorString(array('max_length' => 6, 'required' => false)),
      'fecha'          => new sfValidatorDate(array('required' => false)),
      'cedula'         => new sfValidatorString(array('max_length' => 21, 'required' => false)),
      'telefonos'      => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'telefono_movil' => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'cobranza'       => new sfValidatorNumber(array('required' => false)),
      'expediente'     => new sfValidatorString(array('required' => false)),
      'codigocont'     => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'activcomi'      => new sfValidatorNumber(array('required' => false)),
      'desde1'         => new sfValidatorNumber(array('required' => false)),
      'desde2'         => new sfValidatorNumber(array('required' => false)),
      'desde3'         => new sfValidatorNumber(array('required' => false)),
      'desde4'         => new sfValidatorNumber(array('required' => false)),
      'desde5'         => new sfValidatorNumber(array('required' => false)),
      'desde6'         => new sfValidatorNumber(array('required' => false)),
      'hasta1'         => new sfValidatorNumber(array('required' => false)),
      'hasta2'         => new sfValidatorNumber(array('required' => false)),
      'hasta3'         => new sfValidatorNumber(array('required' => false)),
      'hasta4'         => new sfValidatorNumber(array('required' => false)),
      'hasta5'         => new sfValidatorNumber(array('required' => false)),
      'hasta6'         => new sfValidatorNumber(array('required' => false)),
      'prccomi1'       => new sfValidatorNumber(array('required' => false)),
      'prccomi2'       => new sfValidatorNumber(array('required' => false)),
      'prccomi3'       => new sfValidatorNumber(array('required' => false)),
      'prccomi4'       => new sfValidatorNumber(array('required' => false)),
      'prccomi5'       => new sfValidatorNumber(array('required' => false)),
      'prccomi6'       => new sfValidatorNumber(array('required' => false)),
      'bono1'          => new sfValidatorNumber(array('required' => false)),
      'bono2'          => new sfValidatorNumber(array('required' => false)),
      'bono3'          => new sfValidatorNumber(array('required' => false)),
      'bono4'          => new sfValidatorNumber(array('required' => false)),
      'bono5'          => new sfValidatorNumber(array('required' => false)),
      'bono6'          => new sfValidatorNumber(array('required' => false)),
      'utilvent'       => new sfValidatorNumber(array('required' => false)),
      'aplicaramendoc' => new sfValidatorNumber(array('required' => false)),
      'cobdesde1'      => new sfValidatorNumber(array('required' => false)),
      'cobdesde2'      => new sfValidatorNumber(array('required' => false)),
      'cobdesde3'      => new sfValidatorNumber(array('required' => false)),
      'cobdesde4'      => new sfValidatorNumber(array('required' => false)),
      'cobdesde5'      => new sfValidatorNumber(array('required' => false)),
      'cobdesde6'      => new sfValidatorNumber(array('required' => false)),
      'cobhasta1'      => new sfValidatorNumber(array('required' => false)),
      'cobhasta2'      => new sfValidatorNumber(array('required' => false)),
      'cobhasta3'      => new sfValidatorNumber(array('required' => false)),
      'cobhasta4'      => new sfValidatorNumber(array('required' => false)),
      'cobhasta5'      => new sfValidatorNumber(array('required' => false)),
      'cobhasta6'      => new sfValidatorNumber(array('required' => false)),
      'cobprccomi1'    => new sfValidatorNumber(array('required' => false)),
      'cobprccomi2'    => new sfValidatorNumber(array('required' => false)),
      'cobprccomi3'    => new sfValidatorNumber(array('required' => false)),
      'cobprccomi4'    => new sfValidatorNumber(array('required' => false)),
      'cobprccomi5'    => new sfValidatorNumber(array('required' => false)),
      'cobprccomi6'    => new sfValidatorNumber(array('required' => false)),
      'cobbono1'       => new sfValidatorNumber(array('required' => false)),
      'cobbono2'       => new sfValidatorNumber(array('required' => false)),
      'cobbono3'       => new sfValidatorNumber(array('required' => false)),
      'cobbono4'       => new sfValidatorNumber(array('required' => false)),
      'cobbono5'       => new sfValidatorNumber(array('required' => false)),
      'cobbono6'       => new sfValidatorNumber(array('required' => false)),
      'valoraporcent'  => new sfValidatorNumber(array('required' => false)),
      'no_comi_art'    => new sfValidatorNumber(array('required' => false)),
      'art_prc_1'      => new sfValidatorNumber(array('required' => false)),
      'art_prc_2'      => new sfValidatorNumber(array('required' => false)),
      'art_prc_3'      => new sfValidatorNumber(array('required' => false)),
      'art_prc_4'      => new sfValidatorNumber(array('required' => false)),
      'art_prc_5'      => new sfValidatorNumber(array('required' => false)),
      'art_prc_6'      => new sfValidatorNumber(array('required' => false)),
      'art_prc_7'      => new sfValidatorNumber(array('required' => false)),
      'email'          => new sfValidatorString(array('max_length' => 60, 'required' => false)),
      'campo1'         => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'campo2'         => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'campo3'         => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'campo4'         => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'campo5'         => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'claverest'      => new sfValidatorString(array('max_length' => 8, 'required' => false)),
      'es_servidor'    => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('listvend[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Listvend';
  }

}
